import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBApplication.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBModule/YBHomePage/YBMapMiShuPage/YBMapMiShuProvider/YBMapMiShuDiTuProvider.dart';

import 'YBMapMiShubottomPage.dart';

class YBMapMiShuSelectInfoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
       child: Column(
         children: [
           Container(
             height: 44,
             child: Padding(
               padding:EdgeInsets.only(left: 8),
               child: Row(
                 children: [
                   Container(
                     child: Image.asset(YBImageStyle.getImagePath('lawyerImage_locationImageView')),
                   ),
                   Container(
                     width: 8,
                   ),
                   Container(
                     child: Text('办事位置',style: YBTextStyle.TextStyle48484812,),
                   ),
                   Container(
                     width: 8,
                   ),
                   Expanded(
                     child: Text(
                       "杭州市西湖区",
                       style: YBTextStyle.TextStyle2D69E012,
                     ),
                   ),
                   Container(
                     child: Image.asset(YBImageStyle.getImagePath('lawyerImage_IconСolor'),width: 6,height: 8,),
                   ),
                 ],
               ),
             ),
           ),
           Container(
             height: 44,
             child: Padding(
               padding: EdgeInsets.zero,
               child: InkWell(
                 child: Container(
                   decoration: BoxDecoration(
                     borderRadius: BorderRadius.all(Radius.circular(5.0)),
                     color: YBColor.colorF5F5F7,
                   ),
                   child: Row(
                     children: [
                       Container(
                         width: 8,
                       ),
                       Container(
                         child: Image.asset(YBImageStyle.getImagePath('lawyerImage_shiwuimage')),
                       ),
                       Container(
                         width: 8,
                       ),
                       Container(
                         child: Text(
                           "请选择您要办理的事务",
                           style: YBTextStyle.TextStyle48484814Medium,
                         ),
                       ),

                     ],
                   ),
                 ),
                 onTap: () async {
                   YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage/homePagesShangWuFaLxXingZhengMiShuBanLiShiWuPage');
                  // YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage/homePagesShangwuFaLvXingZhengMiShuHuJiaoPage');
                 },
               ),
             ),
           ),
           Container(
             height: 44,
             child: Padding(
                padding: EdgeInsets.only(left: 8),
                child: Row(
                  children: [
                    Container(
                      child:Text(
                        '热门事务:',
                        style: YBTextStyle.TextStyle48484812,
                      ),
                    ),
                    Expanded(
                      child:ChangeNotifierProvider(
                         create: (context) => YBMapMiShuDiTuProvodier()..getMapLabel("business_mishu","873824f800c947268d62efcdc1db2531","1"),
                         child: Consumer<YBMapMiShuDiTuProvodier>(
                           builder: (context,dataList,child){
                             print('${dataList.mishuModelList}');
                             return Row(
                               children: dataList.mishuModelList.map((e){
                               return Padding(
                                   padding: EdgeInsets.only(left: 3,right: 3),
                                   child: Container(
                                     decoration: BoxDecoration(
                                       borderRadius: BorderRadius.all(Radius.circular(3.0)),
                                       border: Border.all(color: YBColor.color7A7A7A,width: 0.5),

                                     ),
                                     child: Padding(
                                       padding: EdgeInsets.fromLTRB(5, 2, 5, 2),
                                       child: Text(e.name,style: YBTextStyle.TextStyle7A7A7A011N,),
                                     ),
                                   ),
                                );
                               }).toList(),
                             );
                           }
                         ),
                      ),
                    ),
                  ],
                ),
             ),
           ),
           Container(
             height: 44,
             child: Row(
               mainAxisAlignment: MainAxisAlignment.spaceEvenly,
               crossAxisAlignment: CrossAxisAlignment.center,
               children: [
                 YBMapMiShuBottomPage(imageStr: "lawyerImage_suishisuidi",title:'随时随地',),
                 YBMapMiShuBottomPage(imageStr: "lawyerImage_yihubaiyingImage",title:'一呼百应',),
                 YBMapMiShuBottomPage(imageStr: "lawyerImage_mingshirenzhengimage",title:'实名认真',),
                 YBMapMiShuBottomPage(imageStr: "lawyerImage_kefubaozhang",title:'客服保障',),
               ],
             ),
           ),
         ],
       ),
    );
  }
}
